import ls from '../../src/renderer/utils/crypto'

export function handlerRegister(code) {
  const str = ls.getItem(code);

  if (str) {
    const res = JSON.parse(str);
    const n = new Date().getTime();
    const l = new Date(res.limit).getTime() + 24 * 60 * 60 * 1000;
    if (l > n) {
      return res;
    } else {
      return;
    }
  }
}
